]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dnd: Don't try to connect to transition when animations are disabled
authorSebastian Keller <skeller@gnome.org>
Sun, 19 Oct 2025 16:47:31 +0000 (18:47 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 20 Oct 2025 11:51:29 +0000 (11:51 +0000)
When animations are disabled, the ease has finished before the
get_transition() call, causing the latter to return null, which will
result in an error message when connected to.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3922>

js/ui/dnd.js

index cfe8438ad089778206096718b6c9e8da0586dfff..f1ddf81266765834e3953ea2dd5a061906da5744 100644 (file)
@@ -284,7 +284,7 @@ class _Draggable extends Signals.EventEmitter {
                     },
                 });
 
-                this._dragActor.get_transition('scale-x').connect('new-frame', () => {
+                this._dragActor.get_transition('scale-x')?.connect('new-frame', () => {
                     this._updateActorPosition(origScale,
                         origDragOffsetX, origDragOffsetY, transX, transY);
                 });